package com.mydemo.design_pattern.action_type.command_pattern;

import java.util.ArrayList;
import java.util.List;

/**
 * <p></p >
 *
 * @author liming1
 * @version $Id: Shell, v1.0 2019-09-19 15:09 liming1 Exp $
 */
public class Shell {

    List<Command> commands = new ArrayList<>();

    public void addCommond(Command commond){
        this.commands.add(commond);
    }

    public void clickBackspace(){
        commands.forEach(item-> item.execute());
    }
}
